clear all
import excel "../data/fig_a3_data.xlsx", sheet("Sheet1") firstrow clear

label var chinese_prob100 "chinese name with probability 1"

drop count chinese_seller
reshape wide chinese_seller_pct,i(decile_chi_pop) j(chinese_prob100)

graph bar chinese_seller_pct1 chinese_seller_pct0, over(decile_chi_pop)

graph bar chinese_seller_pct1 chinese_seller_pct0, over(decile_chi_pop) ///
ysc(r(0 .24)) ymtick(0(.04).24) ylabel(0(.04).24) /// 
b1title("Chinese Population Share in 2000, by Decile") ///
legend(label(1 "Chinese Buyers") label(2 "Non-Chinese Buyers")) legend(size(small)) ///
fill bar(1, fcolor(gs10) lcolor(black) lwidth(medthick) lpattern(solid)) ///
nofill bar(2, fcolor(white) lcolor(black) lwidth(medthick) ///
lpattern(solid)) graphregion(color(white)) 

graph export "../results/figureA3.pdf", replace
